<?php


namespace catchAdmin\project\request;


use think\Validate;

class AnswerRequest extends Validate
{
    protected $rule = [
        'projectId|问卷Id' => [
            'require'
        ],
        'putChannel|投放渠道' => [
            'require',
            'in:qrcode,wechat,sms,phone,pc,other'
        ],
        /*'his_id|患者登记号' => [
            'require'
        ],*/
        'answer|答题数据' => [
            'require',
        ],
        /*'startTime|答题开始时间' => [
            'number'
        ]*/
        'estimate_type|评估类型' => [
            'require',
            'number'
        ]
    ];

    protected $scene = [
        'create' => ['projectId', 'putChannel', 'his_id', 'answer'],
        'chronicDisease' => ['his_id', 'estimate_type']
    ];
}